import App from './App'
import { createSSRApp } from 'vue'
import * as Pinia from 'pinia'
import $openPage from "/ts/openPage.ts"
import $http from "/ts/http.ts"
import $dateFormat from "/ts/dateFormat.ts"

export function createApp() {
	const app = createSSRApp(App)
	// 配置全局属性
	Object.assign(app.config.globalProperties, {
		$openPage,
		$http,
		$dateFormat,
	})
	app.use(Pinia.createPinia())

	return {
		app,
		Pinia
	}
}
